import request from '@/utils/request'

//补贴活动-统计
export function shopStatistics(params) {
  return request({
    url: `/merchant/subsidy/activity/shop/statistics`,
    method: 'get',
    params
  })
}
//收款活动补贴
export function subsidyActivity(params) {
  return request({
    url: `/system/config/v1/subsidyActivity`,
    method: 'get',
    params
  })
}
//收款活动补贴设置
export function setActivity(data) {
  return request({
    url: '/system/config/v1/subsidyActivity',
    method: 'post',
    data
  })
}
//活动商家添加_店铺列表
export function shopSelectList(params) {
  return request({
    url: `/merchant/subsidy/activity/shop/shopSelectList`,
    method: 'get',
    params
  })
}
//活动商家添加_资产列表
export function assetSelectList(params) {
  return request({
    url: `/merchant/subsidy/activity/shop/assetSelectList`,
    method: 'get',
    params
  })
}
//活动商家添加
export function addShop(data) {
  return request({
    url: '/merchant/subsidy/activity/shop',
    method: 'post',
    data
  })
}
//活动商家--列表
export function shoplist(params) {
  return request({
    url: `/merchant/subsidy/activity/shop`,
    method: 'get',
    params
  })
}
// 活动商家--编辑
export function activitymodify(data) {
  return request({
    url: `/merchant/subsidy/activity/shop`,
    method: 'put',
    data
  })
}
// 活动商家--停止
export function activityStop(id) {
  return request({
    url: `/merchant/subsidy/activity/shop/stop/${id}`,
    method: 'put'
  })
}

//购卡活动列表
export function allList(params) {
  return request({
    url: `/platform/activity/v1/allList`,
    method: 'get',
    params
  })
}

//查询详情
export function platformDetail(id) {
  return request({
    url: `/platform/activity/v1/${id}`,
    method: 'get'
  })
}
//店铺下拉列表 分页
export function adminShopSelectList(params) {
  return request({
    url: `/platform/activity/v1/adminShopSelectList`,
    method: 'get',
    params
  })
}

//查询预付卡信息 分页
export function cardInfoList(params) {
  return request({
    url: `/platform/activity/v1/cardInfoList`,
    method: 'get',
    params
  })
}
//新增购卡活动
export function addPlatform(data) {
  return request({
    url: '/platform/activity/v1/add',
    method: 'post',
    data
  })
}

//编辑购卡活动
export function editPlatform(data) {
  return request({
    url: `/platform/activity/v1/edit`,
    method: 'put',
    data
  })
}

//删除购卡活动
export function deleteActivity(id) {
  return request({
    url: `/platform/activity/v1/${id}`,
    method: 'DELETE',
  })
}

//启动/暂停购卡活动
export function changeStatus(params) {
  return request({
    url: `/platform/activity/v1/changeStatus`,
    method: 'put',
    params
  })
}
//统一字典下拉框查询
export function adminDict(params) {
  return request({
    url: `common/v1/adminDict`,
    params
  })
}

//购卡活动列表
export function consumptionList(params) {
  return request({
    url: `/platform/consumption/activity/v1/list`,
    method: 'get',
    params
  })
}
//爆卡活动列表查询
export function assetCardList(params) {
  return request({
    url: `/asset/experience/v1/assetCardList`,
    method: 'get',
    params
  })
}
//店铺下拉列表 分页(爆卡推荐)
export function shopPageLs(params) {
  return request({
    url: `/common/v1/shopPage`,
    method: 'get',
    params
  })
}
//新增爆卡
export function experienceCard(data) {
  return request({
    url: '/merchant/v1/card',
    method: 'post',
    data
  })
}
//批量下架
export function experienceStop(data) {
  return request({
    url: `/asset/experience/v1/stop`,
    method: 'put',
    data
  })
}
//批量上架
export function experienceReset(data) {
  return request({
    url: `/asset/experience/v1/reset`,
    method: 'put',
    data
  })
}
//启动/暂停消费活动
export function consumptionStatus(params) {
  return request({
    url: `/platform/consumption/activity/v1/changeStatus`,
    method: 'put',
    params
  })
}

//新增消费活动
export function addConsumption(data) {
  return request({
    url: '/platform/consumption/activity/v1',
    method: 'post',
    data
  })
}
//编辑消费得FB活动
export function editConsumption(data) {
  return request({
    url: `/platform/consumption/activity/v1`,
    method: 'put',
    data
  })
}

//删除消费活动
export function deleteConsumption(id) {
  return request({
    url: `/platform/consumption/activity/v1/${id}`,
    method: 'DELETE',
  })
}

//查询消费活动
export function consumptionDetail(id) {
  return request({
    url: `/platform/consumption/activity/v1/${id}`,
    method: 'get'
  })
}
//爆卡详情
export function experienceDetail(params) {
  return request({
    url: `/asset/experience/v1/detail`,
    method: 'get',
    params
  })
}
//编辑爆卡资产
export function modifyExperience(data) {
  return request({
    url: `/asset/experience/v1/card`,
    method: 'put',
    data
  })
}

//1.9.8

//抖音团购列表
export function grouponList(params) {
  return request({
    url: `/merchant/groupon/v1/list`,
    method: 'get',
    params
  })
}
//停用商家团购信息
export function stopGroupon(id) {
  return request({
    url: `/merchant/groupon/v1/${id}`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
//新增商家团购信息
export function addGroupon(data) {
  return request({
    url: '/merchant/groupon/v1',
    method: 'post',
    data
  })
}
//查询开通抖音团购商家下拉框
export function grouponMerchant(params) {
  return request({
    url: `/merchant/groupon/v1/shop/select`,
    method: 'get',
    params
  })
}
//获取商家团购信息详情
export function getInfo(params) {
  return request({
    url: `/merchant/groupon/v1/getInfo`,
    method: 'get',
    params
  })
}
//编辑商家团购信息
export function editGroupon(data) {
  return request({
    url: `/merchant/groupon/v1`,
    method: 'put',
    data
  })
}
//商家团购审核通过
export function grouponAgree(params) {
  return request({
    url: `/merchant/groupon/v1/agree`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//商家团购拒绝通过
export function grouponRefuse(params) {
  return request({
    url: `/merchant/groupon/v1/refuse`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//查询抖音团购订单列表
export function grouponOrdetLs(params) {
  return request({
    url: `/groupon/order/v1/list`,
    method: 'get',
    params
  })
}
//查看团购订单交易快照
export function snapshoot(id) {
  return request({
    url: `/groupon/order/v1/snapshoot/${id}`,
    method: 'get',
  })
}
//查询总余额明细
export function grouponBalanceLs(params) {
  return request({
    url: `/groupon/money/v1/balance/list`,
    method: 'get',
    params
  })
}
//查询订单交易记录
export function grouponTransactionLs(params) {
  return request({
    url: `/groupon/money/v1/transaction/list`,
    method: 'get',
    params
  })
}
//查询提现交易记录
export function grouponWithdrawLs(params) {
  return request({
    url: `/groupon/money/v1/withdraw/list`,
    method: 'get',
    params
  })
}
//轮播图分页列表
export function bannerList(params) {
  return request({
    url: `/banner/v1/list`,
    method: 'get',
    params
  })
}
//新增轮播图
export function addBanner(data) {
  return request({
    url: '/banner/v1',
    method: 'post',
    data
  })
}
//获取轮播图详情
export function getBannerInfo(params) {
  return request({
    url: `/banner/v1/getInfo`,
    method: 'get',
    params
  })
}
//更新轮播图
export function editBanner(data) {
  return request({
    url: `/banner/v1`,
    method: 'put',
    data
  })
}
//删除轮播图
export function deleteBanner(id) {
  return request({
    url: `/banner/v1/${id}`,
    method: 'DELETE',
  })
}
//变更轮播图状态
export function changeBanner(id) {
  return request({
    url: `/banner/v1/${id}`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
//获取抖音团购推荐分页列表
export function grouponRecommendLs(params) {
  return request({
    url: `/merchant/groupon/recommend/v1/list`,
    method: 'get',
    params
  })
}
//查询商家店铺下拉框
export function getShopLs(params) {
  return request({
    url: `/merchant/groupon/v1/shop/select`,
    method: 'get',
    params
  })
}
//查询团购商品下拉框
export function getGrouponList(params) {
  return request({
    url: `/merchant/groupon/v1/groupon/select`,
    method: 'get',
    params
  })
}
//新增商家团购推荐表信息
export function addGrouponRecommend(data) {
  return request({
    url: '/merchant/groupon/recommend/v1',
    method: 'post',
    data
  })
}
//编辑商家团购推荐表信息
export function editGrouponRecommend(data) {
  return request({
    url: `/merchant/groupon/recommend/v1`,
    method: 'put',
    data
  })
}
//获取商家团购推荐表信息详情
export function getGrouponRecommend(params) {
  return request({
    url: `/merchant/groupon/recommend/v1/getInfo`,
    method: 'get',
    params
  })
}
//删除商家团购推荐表信息
export function deleteGrouponRecommend(id) {
  return request({
    url: `/merchant/groupon/recommend/v1/${id}`,
    method: 'DELETE',
  })
}
//抖音提现审核同意
export function withdrawAgree(data) {
  return request({
    url: `/groupon/money/v1/withdraw/agree`,
    method: 'put',
    data
  })
}
//抖音提现审核拒绝
export function withdrawRefuse(data) {
  return request({
    url: `/groupon/money/v1/withdraw/refuse`,
    method: 'put',
    data
  })
}
//查询提现申请数量 (待结算)
export function withdrawListCount(params) {
  return request({
    url: `/groupon/money/v1/withdraw/list/count`,
    method: 'get',
    params
  })
}


// 查询聚客推旅游产品列表
export function listProduct(query) {
  return request({
    url: '/asset/product/list',
    method: 'get',
    params: query
  })
}

// 导出聚客推旅游产品
export function exportProduct(query) {
  return request({
    url: '/asset/product/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获取产品分类列表
export function typeSelectList() {
  return request({
    url: '/asset/product/typeSelectList',
    method: 'get'
  })
}

// 批量改变产品分类
export function batchChangeProductType(data) {
  return request({
    url: '/asset/product/batchChangeProductType',
    method: 'put',
    data: data
  })
}

// 批量改变产品状态
export function batchChangeProductStatus(data) {
  return request({
    url: '/asset/product/batchChangeProductStatus',
    method: 'put',
    data: data
  })
}

// 获取产品统计数量
export function productTotal(params) {
  return request({
    url: '/asset/product/productTotal',
    method: 'get',
    params: params
  })
}

// 2022-7-29
//查询平台团购专题配置列表
export function configureList(params) {
  return request({
    url: '/groupon/special/configure/list',
    method: 'get',
    params: params
  })
}
// 保存专题标题
export function saveConfig(configValue) {
  return request({
    url: `/groupon/special/configure/saveConfig/${configValue}`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
//获取专题标题
export function configureGetConfig(params) {
  return request({
    url: '/groupon/special/configure/getConfig',
    method: 'get',
    params: params
  })
}
//修改专题显示状态
export function configureChangeStatus(params) {
  return request({
    url: `/groupon/special/configure/changeStatus`,
    method: 'put',
    params: params,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
//查询 添加了团购产品的商家列表
export function merchantSelect(params) {
  return request({
    url: '/common/v1/merchant/select',
    method: 'get',
    params: params
  })
}
//获取团购商品列表
export function grouponSelect(data) {
  return request({
    url: '/common/v1/groupon/select',
    method: 'post',
    data,
  })
}
//新增团购专题配置
export function configureAdd(data) {
  return request({
    url: '/groupon/special/configure',
    method: 'post',
    data
  })
}
//获取团购专题配置详情
export function configureGetInfo(params) {
  return request({
    url: '/groupon/special/configure/getInfo',
    method: 'get',
    params: params
  })
}
//编辑团购专题配置
export function configureEdit(data) {
  return request({
    url: `/groupon/special/configure`,
    method: 'put',
    data
  })
}
//删除团购专题配置
export function configureEditDelete(id) {
    return request({
      url: `/groupon/special/configure/${id}`,
      method: 'DELETE',
    })
  }

  
//查询抖音团购套餐配置商家下拉框
export function getAnchorTradeMerchant(params) {
  return request({
    url: `/common/v1/douyin/merchant`,
    method: 'get',
    params
  })
}
//查询抖音团购套餐配置列表
export function getAnchorTradeGoodsList(params) {
  return request({
    url: '/anchor/trade/goods/list',
    method: 'get',
    params: params
  })
}
//查询抖音团购套餐配置免审详情
export function getAnchorTradeDetail(id) {
  return request({
    url: `/anchor/trade/goods/not/audit/detail/${id}`,
    method: 'get',
  })
}
//免审编辑
export function updateAnchorTradeDetail(data) {
  return request({
    url: `/anchor/trade/goods/not/audit`,
    method: 'put',
    data
  })
}
//上下架商品
export function updateAnchorTrade(data) {
  return request({
    url: `/anchor/trade/goods/status`,
    method: 'put',
    data
  })
}